home *** CD-ROM | disk | FTP | other *** search
/ CD Actual 85 / CD Temático 40 Febrero 2004.iso / DOS / testdisk / compile.sh next >
Encoding:
Linux/UNIX/POSIX Shell Script  |  2004-01-10  |  1.9 KB  |  94 lines

  1. #!/bin/sh
  2. CC=gcc
  3. LYNX=links
  4. # Comment the version definition to not compile the library
  5. VER_E2FSPROGS=1.34
  6. VER_PROGSREISERFS=0.3.1-rc8
  7. VER_NTFSPROGS=1.8.2
  8. LIBEXT=e2fsprogs-$VER_E2FSPROGS/lib/ext2fs/libext2fs.a
  9. LIBNTFS=ntfsprogs-$VER_NTFSPROGS/libntfs/.libs/libntfs.a
  10. LIBREISER=progsreiserfs-$VER_PROGSREISERFS/libreiserfs/.libs/libreiserfs.a
  11.  
  12. echo "This script will compile e2fsprogs progsreiserfs ntfsprogs libraries"
  13.  
  14. if [ "$VER_E2FSPROGS" != "" ];
  15. then
  16. if [ ! -e e2fsprogs-$VER_E2FSPROGS.tar.gz ];
  17. then
  18.     $(LYNX) http://prdownloads.sourceforge.net/e2fsprogs/e2fsprogs-$VER_E2FSPROGS.tar.gz
  19. fi
  20.  
  21. if [ ! -e e2fsprogs-$VER_E2FSPROGS/configure ];
  22. then
  23.     tar xzf e2fsprogs-$VER_E2FSPROGS.tar.gz
  24. fi
  25.  
  26. if [ ! -e e2fsprogs-$VER_E2FSPROGS/Makefile ];
  27. then
  28.     cd e2fsprogs-$VER_E2FSPROGS
  29.     ./configure --with-cc=$CC
  30.     cd ..
  31. fi
  32.  
  33. if [ ! -e $LIBEXT ];
  34. then
  35.     make -C e2fsprogs-$VER_E2FSPROGS libs
  36. fi
  37. fi
  38.  
  39. if [ "$VER_PROGSREISERFS" != "" ];
  40. then
  41. if [ ! -e progsreiserfs-$VER_PROGSREISERFS.tar.gz ];
  42. then
  43.     $(LYNX) http://reiserfs.osdn.org.ua/snapshots/progsreiserfs-$VER_PROGSREISERFS.tar.gz
  44. fi
  45.  
  46. if [ ! -e progsreiserfs-$VER_PROGSREISERFS/configure ];
  47. then
  48.     tar xzf progsreiserfs-$VER_PROGSREISERFS.tar.gz
  49. fi
  50.  
  51. if [ ! -e progsreiserfs-$VER_PROGSREISERFS/Makefile ];
  52. then
  53.     cd progsreiserfs-$VER_PROGSREISERFS
  54.     ./configure --disable-nls CC=$CC
  55.     cd ..
  56. fi
  57.  
  58. if [ ! -e $LIBREISER ];
  59. then
  60.     cd progsreiserfs-$VER_PROGSREISERFS
  61.     make
  62.     cd ..
  63. fi
  64. fi
  65.  
  66. if [ "$VER_NTFSPROGS" != "" ];
  67. then
  68. if [ ! -e ntfsprogs-$VER_NTFSPROGS.tar.gz ];
  69. then
  70.     $(LYNX) http://prdownloads.sourceforge.net/linux-ntfs/ntfsprogs-$VER_NTFSPROGS.tar.gz
  71. fi
  72.  
  73.  
  74. if [ ! -e ntfsprogs-$VER_NTFSPROGS/configure ];
  75. then
  76.     tar xzf ntfsprogs-$VER_NTFSPROGS.tar.gz
  77. fi
  78.  
  79. if [ ! -e ntfsprogs-$VER_NTFSPROGS/Makefile ];
  80. then
  81.     cd ntfsprogs-$VER_NTFSPROGS
  82.     ./configure CC=$CC
  83.     cd ..
  84. fi
  85.  
  86. if [ ! -e $LIBNTFS ];
  87. then
  88.     make -C ntfsprogs-$VER_NTFSPROGS libs
  89. fi
  90. fi
  91.  
  92. echo "To compile TestDisk, go in src directory, run make and follow the directives"
  93.  
  94.